<template>
    <view class="content">
        <view class="text-area" v-for="(item,index) in list" :key="index">
            <!-- <text class="title">{{ title }}</text> -->
            <uni-card 
                :title="item.userName"
                :extra="item.createTime">      
                <view>
                    {{ item.createTime }}
                </view>
                <view>
                    {{ item.createTime }}
                </view>
            </uni-card>
        </view>
    </view>
</template>

<script>
import { userList, getLogin } from '../../api/test.js';
export default {
    data() {
        return {
            // title: '主页',
            list: [],
        };
    },
    onLoad() {
        this.getList();
        this.getLogin();
    },
    methods: {
        getList() {
            let params = {
                page: 1,
                limit: 10
            };
            console.log('传参', params);
            userList(params).then(res => {
                console.log('接口返回', res);
                this.list = res.data
            });
        },
        getLogin() {
            getLogin().then(res => {
                console.log('登录成功', res);
            });
        }
    }
};
</script>

<style lang="less">

</style>
